{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "34e2cd53-4c58-484c-958c-03637136ced1",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "from tensor_visualizer import TensorVisualizer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60d39400-9741-4e14-986e-e4ffb522ce0c",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "outputs": [],
   "source": [
    "# Visualize a 4-dimensional numpy array.\n",
    "\n",
    "import numpy as np\n",
    "data = np.random.randn(5, 10, 10, 10)\n",
    "TensorVisualizer(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a30bcd3f-24dd-4c44-a247-0d1953b34e64",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Visualize a 4-dimensional torch tensor.\n",
    "\n",
    "# pip install torch\n",
    "\n",
    "import torch\n",
    "data = torch.randn((5, 10, 10, 10))\n",
    "TensorVisualizer(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "26ce18a6-331f-4811-a0c6-fe0b71300bcd",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Visualize a 3-dimensional MLX tensor.\n",
    "\n",
    "# pip install mlx\n",
    "\n",
    "import mlx.core\n",
    "data = mlx.core.random.uniform(shape=(10,10,10))\n",
    "TensorVisualizer(data)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
